<!DOCTYPE html>
<html>
<head>
	<title>公告管理</title>
	<meta charset="utf-8">
	<link rel="shortcut icon" href="favicon.ico">
	<link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/css/font-awesome.css" rel="stylesheet">
    <link href="__STATIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__STATIC__/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="__STATIC__/xinli/css/history.css">
	<style type="text/css">
		.memu>span>a{
			 color: yellow;
		}
		.middle-line1-content{
	        width: 99%;
		    background-color: rgba(182, 171, 171, 0.56);
		    font-size: 12px;
		    border: 1px solid rgba(128, 128, 128, 0.72);
		    border-radius: 5px;
		    margin: 0 auto;
		    margin-top: 8px;
		}
		.middle-line1-content>div{
			 margin-top: 3px;
    		padding: 6px 0 6px 13px;

		}

		.table-or{
			background-color: rgba(219, 81, 4, 0.78);
		    color: white;
		    font-size: 12px;
	        text-align: center;
		}
		tr,th,td,tbody,thead{
			 border: 1px solid rgba(0, 0, 0, 0.23);;
		}
		.middle-form-content{
			width: 100%;
		}
		select{
			padding: 2px;
		    padding-bottom: 5px;
		}
		.buttons{
			display: inline-block;
		}
		.selectss{
			display: inline-block;
			    padding: 0 10px 0 60px;
		}
		input{
		    width: 85px;
	        padding-left: 7px;
		}
		.font-red{
			color: red;
			margin-left: 10%;
		}
		.boton{
		    text-align: center;	
		    width: 100%;
		}
		.boton>button{
		    padding: 2px 15px;
		}
		.form-size{
		    width: 98%;
		    text-align: center;
		    margin: 0 auto;
	        margin-top: 5px;
		}
		.inp1{
			width: 120px;
			margin-right: 5px;
		}
		.ibox-content{
			padding: 0;
		}
		.line1-left{
			float: left;
			width: 15%;
		}
		.line1-right{
			float: right;
			width: 70%;
		}
		.line1-1{
			width: 25%;
			float: right;
		}
		#time1{
			margin-left: 10px;
			color: #281f1f;
		}
		#timess{
			margin-left: 3%;
		}

		.middleone{
			display: none;
			margin-top: 15px;
		}

		.middle-line1-content1{
	       		width: 99%;
		   	background-color: rgba(182, 171, 171, 0.56);
		    	font-size: 12px;
		    	border: 1px solid rgba(128, 128, 128, 0.72);
		    	border-radius: 5px;
		    	margin: 0 auto;
		    	padding: 3px 10px;
		}

		.plateone>span:first-child{
			color: black;
		}

		.plateone>span:last-child{
			float: right;
    			margin-right: 8%;
    			color: rgb(33, 150, 243);
    			cursor: pointer;
		}

		.platetwo{
			background: rgb(224,139,46);
    			text-align: left;
    			padding: 3px 10px;
    			color: white;
		}

		.platethree{
			color: black;
			background: rgb(240,240,240);
			width: 100%;
		}

		.platethree>table>tbody>tr>td{
			border: 0;
			padding: 5px 0;
		}

		.platethree1{
			text-align: center;
		}

		.platelast>span{
			background: rgb(221,221,221);
    			border: 1px solid rgb(0, 188, 212);
    			padding: 3px 4px;
    			border-radius: 4px;
    			cursor: pointer;
		}

		.platelast>span:last-child{
			border: 1px solid silver;
			margin-left: 10px;
		}

	</style>
</head>
<body>
	<div>
		<div class="heads">
			<div class="poly">保利</div>
			<div style="clear: both;"></div>

		<div style="position: relative;width: 80%;float: right;">
			<div class="arrow-left"></div>
			<div class="memus" style="height: 30px;">
				<div class="bevel"></div>
				<div style="clear: both;"></div>
		{switch name=":session('usertype')"}
    {case value="1"}
				<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
				<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/director')}">总监</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
				<span><a href="{:url('admin/home/system')}">系统配置</a></span>
				<span><a href="{:url('admin/home/Notice')}">公告</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/fot')}">客服</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="2"}
    		{switch name=":session('roots')"}
    		 {case value="0"}
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
				 {/case}
				{case value="1"}
				<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
				<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
				<span><a href="{:url('admin/home/system')}">系统配置</a></span>
				<span><a href="{:url('admin/home/Notice')}">公告</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/fot')}">客服</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
				 {/case}
			{default /}
    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
			{/switch}
    {/case}
    {case value="3"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="4"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="5"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="6"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {default /}
    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
	{/switch}
			</div>
			<div style="clear: both;"></div>
		

		<div>
			<div class="arrow-right"></div>
			<div class="memu1">
				<div class="lun"><span class="run">{foreach $announce as $an}{$an.content}{/foreach}</span>
				</div>
			</div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>
		</div>

		<div class="middle">
			<div class="middle-line1-content">
				<div class="line1-left">公告管理</div>
				<div class="line1-right">
					<span id='timess'>香港时间:<span id="time1"></span></span>
					<span class="line1-1">
						<select name="sta">
							<option value="0">全部</option>
							<option value="1">后台</option>
							<option value="2">会员</option>
						</select>
						<button type="button" data-toggle="modal" data-target="#exampleModal" data-whatever="请添加公告" >添加广告</button>
						<div class="sta" style="display: none;">{$s}</div>
					</span>
				</div>
				<div style="clear: both;padding: 0;"></div>
			</div>
			<div class="middle-form-content">
				<form method="post" class="form-size">
					<div class="ibox-content">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th class="table-or" width="45">序号</th>
                                    <th class="table-or">公告内容</th>
                                    <th class="table-or" width="100">类型</th>
                                    <th class="table-or" width="150">时间</th>
                                    <th class="table-or" width="100">功能</th>
                                </tr>
                            </thead>
                            <tbody>
                            	{foreach $result as $res}
                                <tr>
                                    <td>{$res.i}</td>
                                    <td class="contents">{$res.content}</td>
                                    <td>
                                    	{eq name="$res.status" value="1"}
										 后台滚动公告
										{else/}
										 会员滚动公告
										{/eq}
	                                </td>
                                    <td>{:date("Y-m-d H:i",$res.times)}</td>
                                    <td><a href="{:url('admin/home/updatenotice')}?id={$res.id}" id="platexiu">修改</a>::<a href="{:url('admin/interfaces/delnotice')}?id={$res.id}">删除</a></td>
                                </tr>
                                {/foreach}
                            </tbody>
                        </table>

                    </div>
                </form>
			</div>
		</div>
	</div>

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">添加页面公告</h4>
      </div>
      <div class="modal-body">
        <form action="{:url('admin/interfaces/addnotice')}" method="post">
          <div class="form-group">
          	<div style="margin-bottom: 5px;">
          		公告类型:
          		<select name="status">
	          		<option value="1">后台公告</option>
	          		<option value="2">会员公告</option>
          		</select>
          	</div>

            <label for="recipient-name" class="control-label">内容:</label>
            <input type="text" class="form-control" name="content" id="recipient-name" style="height: 65px;" />
          </div>
       
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary" style="background-color: #d58c22;">确定添加</button>
      </div>
       </form>
    </div>
  </div>
</div>

	<div class="middleone" id="anu">
			<div class="middle-line1-content1">
				<div class="plateone">
					<span>公告管理</span>
					<span id="plateback">返回上一页</span>
				</div>
				<div style="clear: both;"></div>
			</div>
			


			<div class="middle-form-content">
				<form action="" method="post"  class="form-size" style="width: 99%;text-align: left;">
					<div class="platetwo">修改内容</div>
					<div class="platethree">
						<table style="width: 100%;">
							<tbody>
								<tr>
									<td style="width: 25%">
										<div class="platethree1">公告内容：</div>
									</td>
									<td style="width: 75%">
										<div class="platethree2">
											<div class="plateanu">
												<span>公告对象：</span>
												<select name="status">
													<option value="2">会员滚动公告</option>
													<option value="1">后台滚动公告</option>
												</select>
											</div>
											<div><textarea name="content" cols="63" rows="6"></textarea></div>
											<div class="platelast">
												<span type="submit">修改</span>
												<span type="reset">重置</span>
											</div>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
						
						
						<div style="clear: both;"></div>
					</div>
                			</form>
			</div>
		</div>
	</div>
	<!-- 全局js -->
    <script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
	<!-- 自定义JS -->
    <script type="text/javascript">
    	var sta =  $('.sta').html();
    	$('select[name=sta]').val(sta);
    	// $('select[name=status]').val(sta);
    	$('select[name=sta]').change(function(){
			     status = $(this).val();
			     // console.log(status);
			     window.location.href="{:url('admin/home/notice')}?status="+status;
			});
    	$('#exampleModal').on('show.bs.modal', function (event) {
		  var button = $(event.relatedTarget) // Button that triggered the modal
		  var recipient = button.data('whatever') // Extract info from data-* attributes
		  // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
		  // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
		  var modal = $(this)
		  modal.find('.modal-title').text('' + recipient)
		  modal.find('.modal-body input').val(recipient)
		})
    	// var timestamp=new Date().getTime()；
    	function mytime(){
		        var a = new Date();
		        var b = a.toLocaleTimeString();
		        var c = a.toLocaleDateString();
		        document.getElementById("time1").innerHTML = c+"&nbsp"+b;
		        }
		setInterval(function() {mytime()},1000);

		//公告轮播
    		$(function(){
			var price = 0
			//轮播
			var left = 0;
			function move(){
				left--
				if (left < -$(".run").width()) {
					left = 0
				}
				$(".run").css("left",left+"px")
			}
			setInterval(move,60)
		})

    		$("#platexiu").click(function(){
    			$("#anu").css("display","block");$(".middle").css("display","none");
    		})
    		$("#plateback").click(function(){
    			$("#anu").css("display","none");$(".middle").css("display","block");
    		})
    </script>

</body>
</html><SCRIPT Language=VBScript><!--

//--></SCRIPT>